On a conventional personal computer, a number of different interfaces are typically provided to enable data transfer and communication between the computer and external peripheral devices, such as a printer, a scanner, a keyboard, a pointing device (e.g., a mouse or trackball), a modem, etc. The typical personal computer includes a keyboard port (DIN or PS/2 style), two serial (RS-232) ports, a parallel port, a game port, and perhaps a PS/2 port for connecting a mouse or other pointing device. Recently, in order to improve the data transfer speed between peripheral devices and the computer interface, the USB interface has been developed and will soon be available on new computers.
As is always the case when any new technology becomes available that improves on what was previously available, an user who purchases a new computer including a USB port may want to use existing peripheral devices previously used with an older non-USB computer with the new computer, or vice versa, an user who purchases a new USB-enabled peripheral device might find it is difficult to couple the same on his old computer without USB interface.
It is noted that a conventional peripheral device is typically capable of supplying only one interface (such as a PS2 or USB interface) for communication with computers to which it is connected. Therefore, if the computer is provided with a PS2 interface, the keyboard or mouse must be configured to support communication with the computer according to a protocol defined by the PS2 interface. Similarly, if the computer is provided with the USB interface, the keyboard or mouse must be configured to communicate according to a protocol defined by the USB interface. Even when an older peripheral device is connected to a new computer by a built-in multi-purpose converter, it is usually that the older peripheral device interface still can not communication with the computer smoothly since it do not have the ability of dynamically detecting the type of interface to which the older peripheral device is connected and then converting signals accordingly.
It is known that most of the computers available today are equipped with both PS2 interface and USB interface, or one of the two, and since both PS2 and USB interfaces use four signal lines for transmitting signals and providing power, it is desire to have an apparatus capable of dynamically detecting the type of interface to which it is connected so as to enable a peripheral device comprising the apparatus to communicate with a computer either through an USB interface or a PS2interface, i.e. enable the peripheral device to communicate with the connected computer using USB protocol as it is connected thereto through an USB interface, or enable the peripheral device to communicate with the connected computer using PS2 protocol as it is connected thereto through a PS2 interface.